package com.tdcode.ch1;

/**
 * @className: RegularPrice
 * @description:
 * @author: cyd
 * @date: 2021/11/30 下午10:14
 **/
public class RegularPrice extends Price {

    @Override
    int getPriceCode() {
        return Movie.REGULAR;
    }

    @Override
    double getCharge(int daysRented) {
        double result = 2;
        if (daysRented > 2) {
            result += (daysRented -2) * 1.5;
        }
        return result;
    }
}
